{
  "props": {
    "model-value": {
      "type": "Any",
      "desc": "Model of the component; Either use this property (along with a listener for 'update:model-value' event) OR use v-model directive",
      "category": "model"
    },

    "error": {
      "type": [ "Boolean", "null" ],
      "default": null,
      "desc": "Does field have validation errors?",
      "category": "behavior"
    },

    "error-message": {
      "type": "String",
      "desc": "Validation error message (gets displayed only if 'error' is set to 'true')",
      "examples": [ "Username must have at least 5 characters" ],
      "category": "content"
    },

    "no-error-icon": {
      "type": "Boolean",
      "desc": "Hide error icon when there is an error",
      "category": "content"
    },

    "rules": {
      "type": "Array",
      "tsType": "ValidationRule",
      "desc": "Array of Functions/Strings; If String, then it must be a name of one of the embedded validation rules",
      "examples": [
        ":rules=\"[ val => val.length <= 3 || 'Please use maximum 3 characters' ]\"",
        ":rules=\"[ 'fulltime' ]\"",
        ":rules=\"[ (val, rules) => rules.email(val) || 'Please enter a valid email address' ]\""
      ],
      "category": "behavior"
    },

    "reactive-rules": {
      "type": "Boolean",
      "desc": "By default a change in the rules does not trigger a new validation until the model changes; If set to true then a change in the rules will trigger a validation; Has a performance penalty, so use it only when you really need it",
      "category": "behavior"
    },

    "lazy-rules": {
      "type": [ "Boolean", "String" ],
      "desc": "If set to boolean true then it checks validation status against the 'rules' only after field loses focus for first time; If set to 'ondemand' then it will trigger only when component's validate() method is manually called or when the wrapper QForm submits itself",
      "values": [ "(Boolean) true", "(Boolean) false", "ondemand" ],
      "category": "behavior"
    }
  },

  "methods": {
    "resetValidation": {
      "desc": "Reset validation status"
    },

    "validate": {
      "desc": "Trigger a validation",
      "params": {
        "value": {
          "type": "Any",
          "desc": "Optional value to validate against"
        }
      },
      "returns": {
        "type": [ "Boolean", "Promise<boolean>" ],
        "desc": "True/false if no async rules, otherwise a Promise with the outcome (true -> validation was a success, false -> invalid models detected)",
        "examples": [
          "true",
          "validate().then(outcome => { ... })"
        ]
      }
    }
  },

  "computedProps": {
    "hasError": {
      "type": "Boolean",
      "desc": "Whether the component is in error state"
    }
  }
}
